.TH getenv 3 "" "" ""
.SH SYNOPSIS
getenv \- look up environment variable
.SH ANSI_SYNOPSIS
#include <stdlib.h>
.br
char *getenv(const char *
.IR name );
.br
.SH TRAD_SYNOPSIS
#include <stdlib.h>
.br
char *getenv(
.IR name )
.br
char *
.IR name ;
.br
.SH DESCRIPTION
.BR getenv 
searches the list of environment variable names and values
(using the global pointer `
.BR char **environ ')
for a variable whose
name matches the string at 
.IR name .
If a variable name matches,
.BR getenv 
returns a pointer to the associated value.
.SH RETURNS
A pointer to the (string) value of the environment variable, or
.BR NULL 
if there is no such environment variable.
.SH PORTABILITY
.BR getenv 
is ANSI, but the rules for properly forming names of environment
variables vary from one system to another.

.BR getenv 
requires a global pointer 
.BR environ .
.SH SOURCE
src/newlib/libc/stdlib/getenv.c
